package com.project.mapper;

import com.project.bean.FacilitiesBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IFacilitiesMapper {
    /**
     * 根据房间id得到房间设备维护列表
     * @param id 房间id
     * @return 设备维护集合
     */
    public List<FacilitiesBean> findRoomFacilities(int id);
    /**
     * 添加损坏设施记录
     * @param roomId 房间id
     * @param facilitiesBean 设施损坏id
     * */
    public void addFacilities(@Param("facilitiesBean") FacilitiesBean facilitiesBean,
                              @Param("roomId") Integer roomId);


    /**
     * 按设施的id修改设施状态
     * */
    public void changeFacilities(@Param("facilitiesId") Integer facilitiesId,
                                 @Param("status") String status);

    /**
     * 统计指定房间指定状态的设施记录的数量
     * */
    public int countRoom(@Param("roomId") int roomId,
                         @Param("status") String status);
    /**
     * 根据房间id删除设备维护信息
     * @param roomId 房间id
     */
    public void deFacilities(int roomId);
}
